//
//  RSDCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/12.
//  Copyright © 2019 李文强. All rights reserved.
//

#import "RSDCell.h"

@implementation RSDCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubView];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)initSubView{
    [self addSubview:self.webView];
    [_webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@20);
        make.right.equalTo(@0).offset(-20);
        make.top.equalTo(@0);
        make.bottom.equalTo(@0);
    }];
}

- (WKWebView *)webView{
    if (!_webView) {
        WKWebView *web = [[WKWebView alloc]init];
        web.scrollView.scrollEnabled = NO;
        web.backgroundColor = [UIColor whiteColor];
        _webView = web;
    }
    return _webView;
}

@end
